<HTML><HEAD><TITLE>sbds_try(?Var, ++Val)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(fd_sbds)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>sbds_try(?Var, ++Val)</H1>
tries to assign a variable to a value
<DL>
<DT><EM>Var</EM></DT>
<DD>SBDS Variable
</DD>
<DT><EM>Val</EM></DT>
<DD>Value to try and assign to Value
</DD>
</DL>
<H2>Description</H2>
Called for each variable, value pair tried at a decision point 		during search.
	<br>
	<br>
	Initally tries to assign a variable to a value, if this is succesful then it 		updates the symmetry functions to take account of any symmetries which have 		been broken by this assignment.
	<br>
	<br>
	If this assignment is unsuccesful then it stipulates that the variable cannot 		be assigned to this value, before placing constraints to eliminate the 			symmetrical equivalent of this assgnment. If these symmetries are not already 		broken
<H3>Exceptions</H3>
<DL>
<DT><EM>(abort) </EM>
<DD>Var is not an sbds attributed variable
</DL>
<H2>Examples</H2>
<H4><I> Replacement for labeling/1 which takes SBDS into account 		</I></H4>
	<dl>
	<dt>sbds_labeling(AllVars) :-</dt>
        <dd>( foreach(Var, AllVars) do</dd>
	  <dl><dd>count_backtracks,</dd>
            <dd>sbds_indomain(Var)</dd></dl>                       
        <dd>).</dd>
        </dl>
	<H4><I>Replacement for indomain/1 which takes SBDS into account.</I></H4>
	<dl>
	<dt>% value ordering is input order</dt>
	<dt>sbds_indomain(X) :-</dt>
		<dd>nonvar(X).</dd>
	<dt>sbds_indomain(X) :-</dt>
		<dd>var(X),</dd>
		<dd>mindomain(X, LWB),</dd>
		<dd>%sbds_try called here</dd>
		<dd>sbds_try(X, LWB),</dd>
		<dd>sbds_indomain(X).</dd>
	</dl>
<H2>See Also</H2>
<A HREF="../../lib/fd_sbds/sbds_initialise-4.html">sbds_initialise / 4</A>, <A HREF="../../lib/fd_sbds/sbds_initialise-5.html">sbds_initialise / 5</A>, <A HREF="../../lib/ic/search-6.html">ic : search / 6</A>
</BODY></HTML>
